<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCloudimagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cloudimages', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('images_name',255)->default('')->comment('云图片名称');
            $table->string('image_url',255)->nullable('true')->comment('url图片地址');
            $table->tinyInteger('type')->default(0)->comment('图片分类0矿泉水,1茶饮,2果汁,3膨化零食,4乳酸饮料');
            $table->text('base64_image')->nullable('true')->comment('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cloudimages');
    }
}
